﻿#include <iostream>
using namespace std;

int factorial(int n) {
	if (n == 0) {
		return 1;
	}
	else {
		return n * factorial(n - 1);
	}
}

int main() {
	int x;
	cout << "整数值：";
	cin >> x;

	cout << x << "的阶乘是：" << factorial(x) << endl;

	cin.get();
	cin.get();
}